From cdeeb3275aeddd431d066a38f44012c3d3cbb6d8 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Tue, 9 May 2023 19:01:21 +0100 Subject: [PATCH] build: Internal tests must set GTK_COMPILATION Otherwise they won't be able to use the appropriate function visibility on Windows. --- testsuite/css/meson.build | 4 ++-- testsuite/gdk/meson.build | 2 +- testsuite/gsk/meson.build | 2 +- testsuite/gtk/meson.build | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/testsuite/css/meson.build b/testsuite/css/meson.build index 24084d6b05..cf4f2f785d 100644 --- a/testsuite/css/meson.build +++ b/testsuite/css/meson.build @@ -28,7 +28,7 @@ test('api', test_api, test_data = executable('data', sources: ['data.c'], - c_args: common_cflags, + c_args: common_cflags + ['-DGTK_COMPILATION'], include_directories: [confinc, ], dependencies: libgtk_static_dep, ) @@ -42,7 +42,7 @@ test('data', test_data, transition = executable('transition', sources: ['transition.c'], - c_args: common_cflags, + c_args: common_cflags + ['-DGTK_COMPILATION'], dependencies: libgtk_static_dep, ) diff --git a/testsuite/gdk/meson.build b/testsuite/gdk/meson.build index 05f0351393..13ed1ff31c 100644 --- a/testsuite/gdk/meson.build +++ b/testsuite/gdk/meson.build @@ -57,7 +57,7 @@ internal_tests = [ foreach t : internal_tests test_exe = executable(t, '@0@.c'.format(t), - c_args: common_cflags, + c_args: common_cflags + ['-DGTK_COMPILATION'], dependencies: libgtk_static_dep, install: false, ) diff --git a/testsuite/gsk/meson.build b/testsuite/gsk/meson.build index a7bacb0020..7ef11174ae 100644 --- a/testsuite/gsk/meson.build +++ b/testsuite/gsk/meson.build @@ -397,7 +397,7 @@ foreach t : internal_tests test_exe = executable(test_name, sources: test_srcs, dependencies : libgtk_static_dep, - c_args : test_cargs + test_extra_cargs + common_cflags, + c_args : test_cargs + test_extra_cargs + common_cflags + ['-DGTK_COMPILATION'], link_args : test_extra_ldflags, ) diff --git a/testsuite/gtk/meson.build b/testsuite/gtk/meson.build index 7a27180854..9354547bb3 100644 --- a/testsuite/gtk/meson.build +++ b/testsuite/gtk/meson.build @@ -191,7 +191,7 @@ foreach t : internal_tests test_exe = executable(test_name, sources: test_srcs, - c_args: test_cargs + test_extra_cargs, + c_args: test_cargs + test_extra_cargs + ['-DGTK_COMPILATION'], link_args: test_extra_ldflags, dependencies: libgtk_static_dep, ) -- 2.30.2